import ConfigParser


class UploadFileConfig():
    ip = None
    port = None
    username = None
    password = None

class ClientConfig():
    ip  = None
    port  = None
    uploadcfg  = UploadFileConfig()

    def Load(self, filename):
        config  = ConfigParser.ConfigParser()
        config.read(filename)
        self.ip  = config.get('server', 'ip')
        self.port  = config.getint('server', 'port')
        
    def SetUploadFileConfig(self, ip, port, username, password):
        self.uploadcfg.ip = ip
        self.uploadcfg.port = port
        self.uploadcfg.username = username
        self.uploadcfg.password = password
